home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Speccy ClassiX 1998
/
Speccy ClassiX 98.iso
/
amiga_system
/
the_aminet
/
dev
/
amos
/
multipro.lha
/
MultiPro.AMOS
/
MultiPro.amosSourceCode
Wrap
AMOS Source Code
|
1980-04-16
|
5KB
|
172 lines
'
' To do list
' ----------
' Work out method of storing all zone definitions prior to setting up the
' Multipro versions so that they can be restored on exiting the procedure.
'
' Work out method of either making sure the procedure does not keep on
' loading all the font data each time the procedure is called or using
' graphic data for the display instead of the dpaint font.
'
' Incorporate a for next loop so both joysticks can be read in the same
' routine so that you can shorten the code.
'
' Work out the zone commands for the rest of the icons so that they can
' be implemented into the program even if you do not use them yet. Also
' look into methods of detecting if a screen is set up from the examined
' program so that it can be called from the cycle buttons in MultiPro.
'
' ***********************************************
' * MultiPro V2.0 by Anthony Brice, February 94 *
' * *
' * This code is Give-It-Away-Ware, IE: I give *
' * it away hoping someone finds it as useful *
' * as I do. Please read the document file with *
' * this routine for additional information *
' ***********************************************
'
' Specify screen flag when calling MULTI as in example below for screen 0.
'
' Specify bank_number flag for the bank to store packed screens. If no bank
' is specified when they are loaded into another program then they will
' automatically reload into the same slot.
'
' The following two lines are to run the program with screen 0 displayed
' and Bank 6 set for a packed screen.
' Delete them and call the routine from your own program to run MultiPro.
'
MULTI[0,6]
Edit
Procedure MULTI[NUMBER_OF_SCREEN,BANK_NUMBER]
Get Fonts
DISK$="Amos:Amos_Pro/Utilities/"
T=1 : MULTIFONT=0
Repeat
TEST$=Left$(Font$(T),6)
If TEST$="dpaint"
MULTIFONT=T
End If
T=T+1
Until MULTIFONT>0
Limit Mouse 0,0 To 640,300
Screen Open 1,320,200,16,Lowres
Curs Off : Flash Off : Cls 0
Load Iff DISK$+"MultiPro.IFF",1
Screen 1
Reserve Zone 4
Screen Display 1,130,160,320,60
Set Zone 1,91,32 To 104,40
Set Zone 2,107,32 To 116,40
Set Zone 3,120,32 To 125,40
Set Zone 4,6,0 To 232,15
Pen 1 : Paper 0
Locate 19,0
USER_HAS_QUIT=0
BEGIN:
Screen NUMBER_OF_SCREEN
X1=X Mouse : Y1=Y Mouse
X2=X Screen(X1) : Y2=Y Screen(Y1)
Screen 1
M=Mouse Zone
Set Font MULTIFONT : Ink 15,0
X$=Str$(X2)+" " : Y$=Str$(Y2)+" "
Text 15,25,"XPOS :"
Text 75,25,"YPOS :"
Text 45,25,X$
Text 105,25,Y$
If Mouse Key>0 and M=4
' a couple of y parameters are skipped due to a graphic glitch.
If Y2<>7 and Y2<>-3 and Y2<>202
Screen Display 1,130,Y1-5,320,60
If Mouse Key=1
Y Mouse=Y1-1
End If
If Mouse Key=2
Y Mouse=Y1+1
End If
End If
End If
A$=Inkey$
If A$<>""
B$=A$
End If
S=Scancode
If S<>0
SC=S
End If
Locate 0,2
'Print "Char: ";B$;" ";
Locate 10,2
'Print "ASC: ";Asc(B$);" ";
Locate 20,2
'Print "Scan:";SC;" ";
If A$="n" or Mouse Key=1 and M=1
F$=Fsel$(DISK$,"","Select Normal Save Name")
If F$<>""
Save Iff F$,NUMBER_OF_SCREEN
End If
End If
If A$="p" or Mouse Key=1 and M=2
F$=Fsel$(DISK$,"","Select Packed File Name. .PACK will be added")
If F$<>""
Spack NUMBER_OF_SCREEN To BANK_NUMBER
F$=F$+".Pack"
Save F$,BANK_NUMBER
End If
End If
If Mouse Key=1 and M=3
USER_HAS_QUIT=1
End If
Pen 3 : Locate 1,1
'Print "Joystick Port = ";
If Jleft(1)
' Print "Left ";
Goto BEGIN
End If
If Jright(1)
' Print "Right";
Goto BEGIN
End If
If Jup(1)
' Print "Up ";
Goto BEGIN
End If
If Jdown(1)
' Print "Down ";
Goto BEGIN
End If
If Fire(1)
' Print "Fire ";
Goto BEGIN
End If
'
' The following routine is to check a joystick in the mouse port if fitted.
'
Pen 3 : Locate 30,1
'Print "Mouse Port = ";
If Jleft(0)
' Print "Left ";
Goto BEGIN
End If
If Jright(0)
' Print "Right";
Goto BEGIN
End If
If Jup(0)
' Print "Up ";
Goto BEGIN
End If
If Jdown(0)
' Print "Down ";
Goto BEGIN
End If
If Fire(0)
' Print "Fire ";
End If
If USER_HAS_QUIT=0 Then Goto BEGIN
Screen Close 1
Erase BANK_NUMBER
End Proc